<!-- Container Wrapper -->

<div id="mws-container" class="clearfix">

    <!-- Main Container -->
    <div class="container">
        <?php
        if (isset($top_seller) and ($top_seller)) {
            ?>
            <div class="mws-panel grid_8 mws-collapsible">
                <div class="mws-panel-header"> <span class="mws-i-24 i-users">Top Sellers</span> </div>
                <div class="mws-panel-body">
                    <table class="mws-table">
                        <thead>
                            <tr>
                                <th>Sr. No.</th>
                                <th>Seller Name</th>
                                <th>Seller Id</th>
                                <th>Legal Name</th>
                                <th>Join Date</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            $x = 1;
                            foreach ($top_seller as $top_sel) {
                                ?>
                                <tr class="gradeX">
                                    <td><?php echo $x; ?>.</td>
                                    <td><?php echo $html->link($top_sel['Seller']['bs_dis_name'], array('controller' => 'sellers', 'action' => 'store', $top_sel['Seller']['merchant_token'], 'admin' => false)); ?></td>
                                    <td><?php echo $top_sel['Seller']['merchant_token']; ?></td>
                                    <td class="center"><?php echo $top_sel['Seller']['legal_name']; ?></td>
                                    <td class="center"><?php echo $top_sel['Seller']['created']; ?></td>
                                </tr>
        <?php
        $x++;
    }
    ?>
                        </tbody>
                    </table>
                </div>
            </div>
    <?php
}
?>

        <?php
        if (isset($products) and ($products)) {
            ?>
            <div class="mws-panel grid_8 mws-collapsible">
                <div class="mws-panel-header"> <span class="mws-i-24 i-table-1">Top Products</span> </div>
                <div class="mws-panel-body">
                    <table class="mws-table">
                        <thead>
                            <tr>
                                <th>Sr. No.</th>
                                <th>Product Name</th>
                                <th>Product Id</th>
                                <th>Category</th>
                                <th>Price</th>
                            </tr>
                        </thead>
                        <tbody>
    <?php
    $x_1 = 1;
    foreach ($products as $product) {
        ?>
                                <tr class="gradeX">
                                    <td><?php echo $x_1; ?>.</td>
                                    <td><?php echo $product['Product']['name']; ?></td>
                                    <td>WNIS <?php echo $product['Product']['MasterProduct']['wisn']; ?></td>
                                    <td class="center"><?php echo $product['Product']['category']['name']; ?></td>
                                    <td class="center">$ <?php echo $product['Product']['MasterProduct']['price']; ?></td>
                                </tr>
        <?php
        $x_1++;
    }
    ?>

                        </tbody>
                    </table>
                </div>
            </div>
    <?php
}
?>
<?php
if (isset($total_orders) and ($total_orders)) {
    ?>
            <div class="mws-panel grid_8 mws-collapsible">
                <div class="mws-panel-header"> <span class="mws-i-24 i-shopping-cart-3">Total Sale</span> </div>
                <div class="mws-panel-body">
                    <table class="mws-table">
                        <thead>
                            <tr>
                                <th>Toatal Order Price</th>
                                <th>Website Earn Price</th>
                                <th>Merchant Pay Price</th>
                                <th>Payment Status</th>
                                <th>Payment Method</th>
                                <th>Date </th>
                            </tr>
                        </thead>
                        <tbody>
    <?php
    foreach ($total_orders as $total_order) {
        ?>
                                <tr class="gradeX">
                                    <td>$<?php echo $total_order['states']['total_price']; ?></td>
                                    <td>$<?php echo $total_order['states']['wondere_price']; ?></td>
                                    <td>$<?php echo ($total_order['states']['total_price'] - $total_order['states']['wondere_price']); ?></td>
                                    <td class="center">Active</td>
                                    <td class="center"><?php echo $total_order['states']['payment_method']; ?></td>
                                    <td class="center"><?php echo $total_order['date']; ?></td>
                                </tr>
        <?php
    }
    ?>



                        </tbody>
                    </table>
                </div>
            </div>
    <?php
}
?>	

        <!--<div class="mws-panel grid_8 mws-collapsible">
         <div class="mws-panel-header"> <span class="mws-i-24 i-new-message">Messages</span> </div>
         <div class="mws-panel-body">
           <table class="mws-table">
             <thead>
               <tr>
                      <th>Message Send By </th>
                     <th>Message Send to</th>
                 <th>Message Description</th>
                 <th>Date </th>
               </tr>
             </thead>
             <tbody>
                     
               <tr class="gradeX">
                 <td>Andew Staurts</td>
                 <td>John Deo</td>
                 <td>ex irure! Vero tortor inventore felis Praesent excepturi condimentum ipsa fuga? Ducimus! Anim iure! Earum delectus dolorem suspendisse quis mollit ex irure! Vero tortor inventore felis eaque repudiandae doloribus minima. Commodi viverra, quis magni! Dolorem parturient facilisis? Eros sit platea nec.</td>
                 <td class="center">22-April-2012</td>
               </tr>
               <tr class="gradeX">
                 <td>Andew Staurts</td>
                 <td>John Deo</td>
                 <td>ex irure! Vero tortor inventore felis Praesent excepturi condimentum ipsa fuga? Ducimus! Anim iure! Earum delectus dolorem suspendisse quis mollit ex irure! Vero tortor inventore felis eaque repudiandae doloribus minima. Commodi viverra, quis magni! Dolorem parturient facilisis? Eros sit platea nec.</td>
                 <td class="center">22-April-2012</td>
               </tr>
               <tr class="gradeX">
                 <td>Andew Staurts</td>
                 <td>John Deo</td>
                 <td>ex irure! Vero tortor inventore felis Praesent excepturi condimentum ipsa fuga? Ducimus! Anim iure! Earum delectus dolorem suspendisse quis mollit ex irure! Vero tortor inventore felis eaque repudiandae doloribus minima. Commodi viverra, quis magni! Dolorem parturient facilisis? Eros sit platea nec.</td>
                 <td class="center">22-April-2012</td>
               </tr>
               <tr class="gradeX">
                 <td>Andew Staurts</td>
                 <td>John Deo</td>
                 <td>ex irure! Vero tortor inventore felis Praesent excepturi condimentum ipsa fuga? Ducimus! Anim iure! Earum delectus dolorem suspendisse quis mollit ex irure! Vero tortor inventore felis eaque repudiandae doloribus minima. Commodi viverra, quis magni! Dolorem parturient facilisis? Eros sit platea nec.</td>
                 <td class="center">22-April-2012</td>
               </tr>
               <tr class="gradeX">
                 <td>Andew Staurts</td>
                 <td>John Deo</td>
                 <td>ex irure! Vero tortor inventore felis Praesent excepturi condimentum ipsa fuga? Ducimus! Anim iure! Earum delectus dolorem suspendisse quis mollit ex irure! Vero tortor inventore felis eaque repudiandae doloribus minima. Commodi viverra, quis magni! Dolorem parturient facilisis? Eros sit platea nec.</td>
                 <td class="center">22-April-2012</td>
               </tr>
               
             </tbody>
           </table>
         </div>
       </div>-->	

    </div>
    <!-- End Main Container --> 